package com.bosssoft.hr.train.spring.service;

import com.bosssoft.hr.train.spring.dao.UserDao;
import com.bosssoft.hr.train.spring.demo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: wang
 * @Time: 2022/3/6
 */
@Service
public class UserServiceImpl implements UserService{

    @Autowired
    private UserDao userDao;

    public User findById(int id) {
        return userDao.selectById(id);
    }

    public List<User> findByName(String name) {
        return userDao.selectByName(name);
    }

    public Boolean batchRemove(ArrayList id) {
        return userDao.deleteById(id);
    }
}
